package com.gjs.freechat.utils;

import java.awt.image.BufferedImage;

public class ImageUtils {
	
	public static BufferedImage sizeAdjust(BufferedImage img, int[] coords) {
		if (coords[2] != 0 && coords[3] != 0) {
			BufferedImage dist = new BufferedImage(650, 500, BufferedImage.TYPE_INT_RGB);
			dist.getGraphics().drawImage(img, 0, 0, 650, 500, null);
			dist = dist.getSubimage(coords[0], coords[1], coords[2], coords[3]);
			img = dist;
		}
		return img;
	}
}
